package com.ruoyi.currency.service.impl;

import java.util.List;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.currency.mapper.TbCurrencyMapper;
import com.ruoyi.currency.domain.TbCurrency;
import com.ruoyi.currency.service.ITbCurrencyService;

/**
 * 币别Service业务层处理
 * 
 * @author 刘凯豪
 * @date 2025-05-08
 */
@Service
public class TbCurrencyServiceImpl implements ITbCurrencyService 
{
    @Autowired
    private TbCurrencyMapper tbCurrencyMapper;

    /**
     * 查询币别
     * 
     * @param currencyId 币别主键
     * @return 币别
     */
    @Override
    public TbCurrency selectTbCurrencyByCurrencyId(Long currencyId)
    {
        return tbCurrencyMapper.selectTbCurrencyByCurrencyId(currencyId);
    }

    /**
     * 查询币别列表
     * 
     * @param tbCurrency 币别
     * @return 币别
     */
    @Override
    public List<TbCurrency> selectTbCurrencyList(TbCurrency tbCurrency)
    {

        return tbCurrencyMapper.selectTbCurrencyList(tbCurrency);
    }

    /**
     * 新增币别
     * 
     * @param tbCurrency 币别
     * @return 结果
     */
    @Override
    public int insertTbCurrency(TbCurrency tbCurrency)
    {
        return tbCurrencyMapper.insertTbCurrency(tbCurrency);
    }

    /**
     * 修改币别
     * 
     * @param tbCurrency 币别
     * @return 结果
     */
    @Override
    public int updateTbCurrency(TbCurrency tbCurrency)
    {
        return tbCurrencyMapper.updateTbCurrency(tbCurrency);
    }

    /**
     * 批量删除币别
     * 
     * @param currencyIds 需要删除的币别主键
     * @return 结果
     */
    @Override
    public int deleteTbCurrencyByCurrencyIds(Long[] currencyIds)
    {
        return tbCurrencyMapper.deleteTbCurrencyByCurrencyIds(currencyIds);
    }

    /**
     * 删除币别信息
     * 
     * @param currencyId 币别主键
     * @return 结果
     */
    @Override
    public int deleteTbCurrencyByCurrencyId(Long currencyId)
    {
        return tbCurrencyMapper.deleteTbCurrencyByCurrencyId(currencyId);
    }
}
